import Vue from 'vue';
import Vuex from 'vuex';
import home from './modules/home';
import user from './modules/user';
import createLogger from 'vuex/dist/logger';

Vue.use(Vuex);

export function createStore () {
  return new Vuex.Store({
    strict: process.env.NODE_ENV !== 'production',
    modules: {
      home:home,
      user:user
    },
    plugins: process.env.NODE_ENV !== 'production' ? [createLogger()] : []
  });
}
